import requests
#超时处理
# base_url = r'http://httpbin.org/'
# url = base_url + 'get'
# resp = requests.get(url, timeout=2)
# print(resp.status_code)
# print(resp.text)

#SSL验证
url = r'https://www.baidu.com/'
resp = requests.get(url)
# resp.encoding = 'utf-8'
print(resp.status_code)
print(resp.text)
